package com.party.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TKsRecord;
import com.party.business.mapper.TKsRecordMapper;
import com.party.business.service.ITKsRecordService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 考试记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-15
 */
@Service
public class TKsRecordServiceImpl extends ServiceImpl<TKsRecordMapper, TKsRecord>  implements ITKsRecordService
{
    @Autowired
    private TKsRecordMapper tKsRecordMapper;

    /**
     * 查询考试记录
     *
     * @param id 考试记录主键
     * @return 考试记录
     */
    @Override
    public TKsRecord selectTKsRecordById(String id)
    {
        return tKsRecordMapper.selectTKsRecordById(id);
    }

    /**
     * 查询考试记录列表
     *
     * @param tKsRecord 考试记录
     * @return 考试记录
     */
    @Override
    public List<TKsRecord> selectTKsRecordList(TKsRecord tKsRecord)
    {
        return tKsRecordMapper.selectTKsRecordList(tKsRecord);
    }

    /**
     * 新增考试记录
     *
     * @param tKsRecord 考试记录
     * @return 结果
     */
    @Override
    public int insertTKsRecord(TKsRecord tKsRecord)
    {
                tKsRecord.setCreateTime(DateUtils.getNowDate());
            return tKsRecordMapper.insertTKsRecord(tKsRecord);
    }

    /**
     * 修改考试记录
     *
     * @param tKsRecord 考试记录
     * @return 结果
     */
    @Override
    public int updateTKsRecord(TKsRecord tKsRecord)
    {
                tKsRecord.setUpdateTime(DateUtils.getNowDate());
        return tKsRecordMapper.updateTKsRecord(tKsRecord);
    }

    /**
     * 批量删除考试记录
     *
     * @param ids 需要删除的考试记录主键
     * @return 结果
     */
    @Override
    public int deleteTKsRecordByIds(String[] ids)
    {
        return tKsRecordMapper.deleteTKsRecordByIds(ids);
    }

    /**
     * 删除考试记录信息
     *
     * @param id 考试记录主键
     * @return 结果
     */
    @Override
    public int deleteTKsRecordById(String id)
    {
        return tKsRecordMapper.deleteTKsRecordById(id);
    }
}
